package router

import (
	"api-gateway/cross"
	"api-gateway/handler/api"
	"github.com/gin-gonic/gin"
)

func Router() *gin.Engine {
	r := gin.Default()
	r.Use(cross.Cors())
	r.POST("/sendSms", api.SendSms)
	r.POST("/register", api.Register)
	r.POST("/login", api.Login)
	r.POST("/upload", api.Upload)
	r.POST("/videoAdd", api.VideoAdd)
	r.POST("/VideoCheck", api.VideoCheck)
	r.POST("/CreateType", api.CreateType)
	r.POST("/CreateTag", api.CreateTag)
	r.POST("/CountVideoType", api.CountVideoType)
	r.POST("/CreateDram", api.CreateDram)
	r.POST("/AppendAdd", api.AppendAdd)
	r.POST("/CollectAdd", api.CollectAdd)
	r.POST("/RecordList", api.RecordList)
	r.POST("/MemberOrder", api.MemberOrder)
	r.POST("/MemberShow", api.MemberShow)
	r.POST("/VideoHot", api.VideoHot)

	return r

}
